package com.keensense.vcm.common.parser;

import com.keensense.vcm.common.comm.ResponseMessage;

/**
 * @author lanjian
 * @date 2020/4/29
 */
public interface ResponseParser<T> {
    /**
     * Converts the result from stream to a java object.
     *
     * @param response The stream of the result.
     * @return The java Type T object that the result stands for.
     * @throws ResponseParseException Failed to parse the result.
     */
    <T> T parse(ResponseMessage response) throws ResponseParseException;


}